#ifndef HYBRIDPLUGINXMLHANDLER_H
#define HYBRIDPLUGINXMLHANDLER_H

#include <QXmlStreamReader>
#include <QSharedPointer>
#include <QFile>

#include "hybridplugin.h"

class HybridPlugin;

class HybridPluginXmlHandler : public QXmlStreamReader
{
public:
    HybridPluginXmlHandler(QFile *xmlFile);
    ~HybridPluginXmlHandler();

    QSharedPointer<HybridPlugin> parse();

private:
    void handlePluginTag();
    void handlePlatformsTag();
    void handlePlatformTag();
    void handleDependsTag();
    void handleItemTag();

private:
    QFile *m_file;
    QSharedPointer<HybridPlugin> m_plugin;
    QSharedPointer<HybridPluginPlatform> m_currentPlatform;

};

#endif // HYBRIDPLUGINXMLHANDLER_H
